

import { createApp } from 'vue'

import App from './App.vue'
import router from './router'
// import 'element-plus/es/components/message/style/css'
// import 'element-plus/es/components/message-box/style/css'
// import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 登录状态拦截守卫
// router.beforeEach((to, from, next) => {
//   const admin = adminStore()
//
//   // 会话有效
//   if (admin.isActive()) {
//     return next()
//   }
//
//   // 不需要登录
//   const noLogin = to.matched.some((record) => record.meta.noAuth)
//   if (noLogin) {
//     return next()
//   }
//
//   // 跳转登录页
//   next({ path: '/login', query: { redirect: to.fullPath } })
// })

const app = createApp(App)

app.use(router)

  // for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  //   app.component(key, component)
  // }

app.mount('#app')
